using System;
using System.Collections;
using System.Collections.Generic;
using FrameWork;
using UnityEngine;
using UnityEngine.UI;

public class UIMain : MonoBehaviour
{
    private void Awake()
    {
        UIModule.Instance.Initialize();
    }
    void Start()
    {
        LoginTestWindow loginTestWindow1 = UIModule.Instance.PopUpWindow<LoginTestWindow>();
        loginTestWindow1.Test1();
        LoginTestWindow loginTestWindow2 = UIModule.Instance.GetWindow<LoginTestWindow>();
        loginTestWindow2.Test2();
    }

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q))
        {
            UIModule.Instance.PopUpWindow<AccountTestWindow>();
        }
        if (Input.GetKeyDown(KeyCode.W))
        {
            UIModule.Instance.PopUpWindow<SignUpTestWindow>();
        }
        if (Input.GetKeyDown(KeyCode.E))
        {
            UIModule.Instance.HideWindow<AccountTestWindow>();
            // UIModule.Instance.DestroyAllWindow(new List<string>(){"LoginTestWindow"});
        }
        if (Input.GetKeyDown(KeyCode.R))
        {
            UIModule.Instance.HideWindow<SignUpTestWindow>();
            // UIModule.Instance.DestroyAllWindow(new List<string>(){"LoginTestWindow"});
        }
    }
}